package com.szc.demo01.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.szc.demo01.pojo.MFile;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @Author: ShiZhiCheng
 * @Date: 2021/01/12 17:09:17
 */
public interface FileMapper extends BaseMapper<MFile> {

    /**
     * 展示已发送的文件
     *
     * @param id 发送人id
     * @return
     */
    public List<MFile> sendFiles(long id);

    public List<MFile> receiveFiles(long id);

    public List<MFile> notreceiveFiles(long id);

    @Select("select * from file where f_id=#{fileId} and receive_id=#{receiveId}")
    public MFile downFile(@Param("fileId") long fileId,@Param("receiveId") long receiveId);
}

